package com.yonyou.common.service.messagecenter.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Configuration
@Component
public class RabbitMQConfig {

	@Value("${spring.rabbitmq.host}")
    private String host;
    @Value("${spring.rabbitmq.port}")
    private String port;
    @Value("${spring.rabbitmq.username}")
    private String username;
    @Value("${spring.rabbitmq.password}")
    private String password;
    @Value("${spring.rabbitmq.virtual-host}")
    private String virtualhost;
    @Value("${mq.consumer.count}")
    private int consumerCount;
    @Value("${mq.pauseSec}")
    private int pauseSec;
    @Value("${mq.resend.time}")
    private int reSendSec;
    
    @Value("${mq.exchange}")
    private String exchanges;
    
    @Value("${mq.queue}")
    private String queues;
    
    @Value("${mq.consumer}")
    private String consumers;
    
    @Value("${mq.max.connection}")
    private int maxConnection;
    
    @Value("${mq.connection.timout}")
    private int timeout;
    
    @Value("${mq.busy.sleeptime}")
    private int sleeptime;
    
    public String getConsumers() {
		return consumers;
	}
	public void setConsumers(String consumers) {
		this.consumers = consumers;
	}
	public RabbitMQConfig(){
    	host="";
    }
	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public String getPort() {
		return port;
	}

	public void setPort(String port) {
		this.port = port;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getVirtualhost() {
		return virtualhost;
	}

	public void setVirtualhost(String virtualhost) {
		this.virtualhost = virtualhost;
	}

	public String getExchanges() {
		return exchanges;
	}

	public void setExchanges(String exchanges) {
		this.exchanges = exchanges;
	}

	public String getQueues() {
		return queues;
	}

	public void setQueues(String queues) {
		this.queues = queues;
	}
	public int getConsumerCount() {
		return consumerCount;
	}
	public void setConsumerCount(int consumerCount) {
		this.consumerCount = consumerCount;
	}
	public int getPauseSec() {
		return pauseSec;
	}
	public void setPauseSec(int pauseSec) {
		this.pauseSec = pauseSec;
	}
	public int getReSendSec() {
		return reSendSec;
	}
	public void setReSendSec(int reSendSec) {
		this.reSendSec = reSendSec;
	}
	public int getMaxConnection() {
		return maxConnection;
	}
	public void setMaxConnection(int maxConnection) {
		this.maxConnection = maxConnection;
	}
	public int getTimeout() {
		return timeout;
	}
	public void setTimeout(int timeout) {
		this.timeout = timeout;
	}
	public int getSleeptime() {
		return sleeptime;
	}
	public void setSleeptime(int sleeptime) {
		this.sleeptime = sleeptime;
	}
	
	
}
